package com.freejava.testredis.demo.service;

import com.freejava.testredis.demo.mapper.ProductMapper;
import com.freejava.testredis.demo.pojo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductService {

    @Autowired
    ProductMapper productMapper;

    public List<Product> getList() {
        return productMapper.getList();
    }


    public Product findOneById(Long id) {
        return productMapper.findById(id);
    }
}
